import java.util.Scanner;

/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2214 2215
 * @Package: PACKAGE_NAME
 * @File: DoWhile3.java
 * @Time: 2022/12/5 20:32
 * @Author: abcque
 * @Description: 计算阶乘
 * @Modifier:
 * @ModifyDate:
 * @ModifyRemark:
 */
public class DoWhile3 {
    public static void main(String[] args) {
        // step1、通过键盘输入 n。
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();

        // step2、使用 do-while 遍历 1-n
        int i = 1;
        int step = 1;
        do {
            step *= i;
            ++i;
        } while ( i <= n);

        System.out.println("step = " + step);
    }
}
